[−][src]Crate audiotags
audiotags
This crate makes it easier to parse, convert and write metadata (a.k.a tag) in audio files of different file types.
This crate aims to provide a unified trait for parsers and writers of different audio file formats.
This means that you can parse tags in mp3, flac, and m4a files with a single function: Tag::default(). read_from_path()
and get fields by directly calling .album()
, .artist()
on its result. Without this
crate, you would otherwise need to learn different APIs in id3, mp4ameta etc. in order to parse
metadata in different file formats.
Performance
Using audiotags incurs a little overhead due to vtables if you want to guess the metadata format (from file extension). Apart from this the performance is almost the same as directly calling function provided by those 'specialized' crates.
No copies will be made if you only need to read and write metadata of one format. If you want to convert between tags, copying is unavoidable no matter if you use audiotags or use getters and setters provided by specialized libraries. audiotags is not making additional unnecessary copies.
Theoretically it is possible to achieve zero-copy conversions if all parsers can parse into a unified struct. However, this is going to be a lot of work. I might be able to implement them, but it will be no sooner than the Christmas vacation.
Read the manual for some examples.
Re-exports
pub use anytag::*; |
pub use components::*; |
pub use error::Error; |
pub use error::Result; |
pub use traits::*; |
pub use types::*; |
pub use config::Config; |
Modules
anytag | |
components | |
config | |
error | |
traits | |
types |
Macros
convert | Convert a concrete tag type into another |
Structs
Tag | A builder for |
Enums
TagType |
Traits
TryFrom | Simple and safe type conversions that may fail in a controlled
way under some circumstances. It is the reciprocal of |
TryInto | An attempted conversion that consumes |